/**
 * 路由配置 (相对于pages来配置component路径)
 */
export default [
  {
    path: '/',
    component: '../layouts/index',
    routes: [
      // 重定向->首页
      {
        path: '/',
        redirect: '/home/website/main',
      },
      // 内容
      {
        path: '/home',
        component: './home/_layout',
        routes: [
          {
            path: '/home',
            redirect: '/home/website/main',
          }, 
          // 站点
          {
            path: '/home/website',
            component: './home/website/_layout',
            routes: [
              // 站点-首页
              {
                path: '/home/website/main',
                component: './home/website/main/index',
              },
              // 站点-回收站
              {
                path: '/home/website/recycleBin',
                component: './home/website/recycle-bin/index',
              },
              // 站点-文章
              {
                path: '/home/website/article',
                component: './home/website/article/index',
              },
              // 站点-栏目
              {
                path: '/home/website/column',
                component: './home/website/column/index',
              },
              // 站点-模板
              {
                path: '/home/website/template',
                component: './home/website/template/index',
              },
              // 站点-权限
              {
                path: '/home/website/authority',
                component: './home/website/authority/index',
              },
            ],
          },
          // 检索
          {
            path: '/home/search',
            component: './home/search/_layout',
            routes: [
              // 主页
              {
                path: '/home/search',
                redirect: '/home/search/main',
              },
              {
                path: '/home/search/main',
                component: './home/search/main/index',
              },
            ],
          },
          // 统计
          {
            path: '/home/statistics',
            component: './home/statistics/_layout',
            routes: [
              // 按文章统计
              {
                path: '/home/statistics/artical',
                component: './home/statistics/artical/index',
              },
              // 按栏目统计
              {
                path: '/home/statistics/column',
                component: './home/statistics/column/index',
              },
              // 按组织统计
              {
                path: '/home/statistics/organization',
                component: './home/statistics/organization/index',
              },
              // 按用户统计
              {
                path: '/home/statistics/user',
                component: './home/statistics/user/index',
              },
              // 按站点统计
              {
                path: '/home/statistics/website',
                component: './home/statistics/website/index',
              },
            ],
          },
          // 系统
          {
            path: '/home/system',
            component: './home/system/_layout',
            routes: [
              // 白名单
              {
                path: '/home/system/whiteList',
                component: './home/system/white-list/index',
              },
              // 权限
              {
                path: '/home/system/authority',
                component: './home/system/authority/index',
              },
              // FTP管理
              {
                path: '/home/system/ftp',
                component: './home/system/ftp/index',
              },
            ],
          },
        ],
      },
    ],
  },
]
